<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>日志查询</title>
    <!-- jquery -->
    <script src="../js/jquery.min.js"></script>
    <!-- bootstrap -->
    <script src="../js/bootstrap3/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../js/bootstrap3/css/bootstrap.css"/>
    <!-- bootstrap table -->
    <script src="../js/bootstrap-table/bootstrap-table.js"></script>
    <link rel="../js/bootstrap-table/bootstrap-table.css"/>
    <script src="../js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
</head>

<body>
    <div id="logTable"></div>
</body>
<script>
    //初始化加载：日志列表查询
    $(function(){
        ininLogTable();
    })

    //日志列表查询
    function ininLogTable(){
        $("#logTable").bootstrapTable({
            url:'../product/findLogList',
            method:'post',
            contentType:'application/x-www-form-urlencoded',//post请求按照表单方式
            pagination:true,
            clickToSelect: true, //是否启用点击选中行
            sidePagination:'server',//分页方式：client客户端分页，server服务端分页
            striped:true,//斑马线
            queryParams:function(){
                return {
                    page:this.pageNumber,
                    rows:this.pageSize
                };
            },
            columns:[
                [
                {field:'id',checkbox:true},
                {field:'className',title:'类名'},
                {field:'methodName',title:'方法名'},
                {field:'requestParams',title:'请求参数'},
                {field:'responseParams',title:'响应参数'},
                {field:'createTime',title:'操作时间',formatter:function(value,row,index){
                    var str ='';
                    str += value.substring(0,10)+" ";
                    str += value.substring(12,19);
                    return str;
                    }}
               ]
            ]
        })
    }

</script>
</html>